package com.lcx.hw.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.mail.MessagingException;

@RestController
@RequestMapping("/email")
public class EmailController {

//    @Autowired
//    private EmailService emailService;

    //email/send/{email}/{code}
//    @GetMapping("/send/{email}/{code}")
//    public Boolean send(@PathVariable("email") String email,
//                            @PathVariable("code") String code){
//        try {
//            emailService.send(email,code);
//        } catch (MessagingException e) {
//            e.printStackTrace();
//            return false;
//        }
//        return true;
//    }

}
